import store from "@/store";

const hasPermission = {
  inserted: function(el, { value }) {
    const { getUserType, getUserAccount } = store.getters;
    //admin
    if (getUserType === 3) return;
    //teacher
    if (getUserType === 1)
      if (getUserAccount !== value) el.parentNode.removeChild(el);
  }
};
export default {
  hasPermission
};
